home *** CD-ROM | disk | FTP | other *** search
/ Workbench Add-On / Workbench Add-On - Volume 1.iso / BBS-Archive / Dev / gcc263-src.lha / gcc-2.6.3 / config / mips / iris5.h < prev    next >
C/C++ Source or Header  |  1994-09-20  |  5KB  |  136 lines

  1. /* Definitions of target machine for GNU compiler.  Iris version 5.
  2.    Copyright (C) 1993 Free Software Foundation, Inc.
  3.  
  4. This file is part of GNU CC.
  5.  
  6. GNU CC is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 2, or (at your option)
  9. any later version.
  10.  
  11. GNU CC is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU General Public License for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with GNU CC; see the file COPYING.  If not, write to
  18. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  19.  
  20. #define    TARGET_DEFAULT    MASK_ABICALLS
  21. #define ABICALLS_ASM_OP ".option pic2"
  22.  
  23. #include "mips/iris4.h"
  24.  
  25. /* Irix 5 doesn't use COFF, so disable special COFF handling in collect2.c.  */
  26. #undef OBJECT_FORMAT_COFF
  27.  
  28. /* ??? This is correct, but not very useful, because there is no file that
  29.    uses this macro.  */
  30. /* ??? The best way to handle global constructors under ELF is to use .init
  31.    and .fini sections.  Unfortunately, there is apparently no way to get
  32.    the Irix 5.x (x <= 2) assembler to create these sections.  So we instead
  33.    use collect.  The linker can create these sections via -init and -fini
  34.    options, but using this would require modifying how crtstuff works, and
  35.    I will leave that for another time (or someone else).  */
  36. #define OBJECT_FORMAT_ELF
  37.  
  38. /* Specify wchar_t types.  */
  39. #undef    WCHAR_TYPE
  40. #undef    WCHAR_TYPE_SIZE
  41. #undef    MAX_WCHAR_TYPE_SIZE
  42.  
  43. #define WCHAR_TYPE    "long int"
  44. #define WCHAR_TYPE_SIZE    LONG_TYPE_SIZE
  45. #define MAX_WCHAR_TYPE_SIZE    MAX_LONG_TYPE_SIZE
  46.  
  47. /* ??? _MIPS_SIM and _MIPS_SZPTR should eventually depend on options when
  48.    options for them exist.  */
  49.  
  50. #undef CPP_PREDEFINES
  51. #define CPP_PREDEFINES \
  52.  "-Dunix -Dmips -Dsgi -Dhost_mips -DMIPSEB -D_MIPSEB -DSYSTYPE_SVR4 \
  53.   -D_SVR4_SOURCE -D_MODERN_C -D__DSO__ \
  54.   -D_MIPS_SIM=_MIPS_SIM_ABI32 -D_MIPS_SZPTR=32 \
  55.   -Asystem(unix) -Asystem(svr4) -Acpu(mips) -Amachine(sgi)"
  56.  
  57. #undef CPP_SPEC
  58. #define CPP_SPEC "\
  59. %{!ansi:-D__EXTENSIONS__ -D_SGI_SOURCE -D_LONGLONG} \
  60. %{.cc:    -D_LANGUAGE_C_PLUS_PLUS} \
  61. %{.cxx:    -D_LANGUAGE_C_PLUS_PLUS} \
  62. %{.C:    -D_LANGUAGE_C_PLUS_PLUS} \
  63. %{.m:    -D_LANGUAGE_OBJECTIVE_C -D_LANGUAGE_C} \
  64. %{.S:    -D_LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \
  65. %{.s:    -D_LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \
  66. %{!.S:%{!.s: %{!.cc: %{!.cxx: %{!.C: %{!.m: -D_LANGUAGE_C %{!ansi:-DLANGUAGE_C}}}}}}}\
  67. %{!mfp64: -D_MIPS_FPSET=16}%{mfp64: -D_MIPS_FPSET=32} \
  68. %{mips1: -D_MIPS_ISA=_MIPS_ISA_MIPS1} \
  69. %{mips2: -D_MIPS_ISA=_MIPS_ISA_MIPS2} \
  70. %{mips3: -D_MIPS_ISA=_MIPS_ISA_MIPS3} \
  71. %{!mips1: %{!mips2: %{!mips3: -D_MIPS_ISA=_MIPS_ISA_MIPS1}}} \
  72. %{!mint64: -D_MIPS_SZINT=32}%{mint64: -D_MIPS_SZINT=64} \
  73. %{!mlong64: -D_MIPS_SZLONG=32}%{mlong64: -D_MIPS_SZLONG=64} \
  74. %{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \
  75. %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \
  76. %{mips3:-U__mips -D__mips=3}"
  77.  
  78. #undef LINK_SPEC
  79. #define LINK_SPEC "\
  80. %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} \
  81. %{bestGnum} %{shared} %{non_shared} \
  82. %{call_shared} %{no_archive} %{exact_version} \
  83. %{!shared: %{!non_shared: \
  84.        %{!call_shared: -call_shared -no_unresolved}}} \
  85. -_SYSTYPE_SVR4"
  86.  
  87. #undef LIB_SPEC
  88. #define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} -lc crtn.o%s"
  89.  
  90. /* We do not want to run mips-tfile!  */
  91. #undef ASM_FINAL_SPEC
  92.  
  93. /* The system header files are C++ aware. */
  94. /* ??? Unfortunately, most but not all of the headers are C++ aware.
  95.    Specifically, curses.h is not, and libg++ won't build because of it
  96.    if this is defined.  On the other hand, SGI has C++ packages with
  97.    header files in /usr/include, and they won't work unless this is
  98.    defined.  We need some way to fix just those files that need fixing.  */
  99. /* #define NO_IMPLICIT_EXTERN_C 1 */
  100.  
  101. /* We don't support debugging info for now. */
  102. #undef DBX_DEBUGGING_INFO
  103. #undef SDB_DEBUGGING_INFO
  104. #undef MIPS_DEBUGGING_INFO
  105.  
  106. #undef MACHINE_TYPE
  107. #define MACHINE_TYPE "SGI running IRIX 5.0"
  108.  
  109. /* -G is incompatible with -KPIC which is the default, so only allow objects
  110.    in the small data section if the user explicitly asks for it.  */
  111. #undef MIPS_DEFAULT_GVALUE
  112. #define MIPS_DEFAULT_GVALUE 0
  113.  
  114. /* In Irix 5, we must output a `.global name .text' directive for every used
  115.    but undefined function.  If we don't, the linker may perform an optimization
  116.    (skipping over the insns that set $gp) when it is unsafe.  This is used
  117.    indirectly by ASM_OUTPUT_EXTERNAL.  */
  118. #define ASM_OUTPUT_UNDEF_FUNCTION(FILE, NAME)    \
  119. do {                        \
  120.   fputs ("\t.globl ", FILE);            \
  121.   assemble_name (FILE, NAME);            \
  122.   fputs (" .text\n", FILE);            \
  123. } while (0)
  124.  
  125. /* Also do this for libcalls.  */
  126. #define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN)    \
  127.   mips_output_external_libcall (FILE, XSTR (FUN, 0))
  128.  
  129. /* This does for functions what ASM_DECLARE_OBJECT_NAME does for variables.
  130.    This is used indirectly by ASM_OUTPUT_EXTERNAL.  */
  131. #define ASM_DECLARE_FUNCTION_SIZE(STREAM, NAME, DECL)    \
  132. do {                            \
  133.   tree name_tree = get_identifier (NAME);        \
  134.   TREE_ASM_WRITTEN (name_tree) = 1;            \
  135. } while (0)
  136.